#include "..\..\NUnit\NUnitModule.h"
Declare_Collections_IEnumerator(System_Int32, int_)
Declare_Collections_IEnumerable(System_Int32, int_)
Declare_Collections_ICollection(System_Int32, int_)

array_Declare_GetEnumerable(System_Int32, int_)
Declare_System_Array(System_Int32, int_)
Declare_System_Action(System_Int32, int_)
Declare_System_Predicate(System_Int32, int_)
Declare_System_Comparison(System_Int32, int_)
Declare_Collections_IComparer(System_Int32, int_)
Declare_Collections_List(System_Int32, int_)

Declare_System_ArrayXSZArrayEnumerator(System_Int32, int_)
	public bool MoveNext(System_ArrayXSZArrayEnumerator(System_Int32) *t)
	{
		printf("1a: %d, b: %d\n", t->_index, t->_endIndex);
		if (t->_index < t->_endIndex)
		{
			t->_index++;
			return (t->_index < t->_endIndex);
		}
		return false;
	}

private_ static_ void Add_TwoElementList_CountEqualsThree()
{
	Collections_IEnumerable(System_Int32) *collection;
	Collections_IEnumerator(System_Int32) *enumerator;
	localArray(3, int_ ints[] = { 0, 1 });
	collection = array_getEnumerable(System_Int32, ints);
	enumerator = vcallT(Collections_IEnumerable,System_Int32,collection,GetEnumerator);
	enumerator->__vtable[0] = (System_ObjectVector)&MoveNext;
	while (vcallT(Collections_IEnumerator,System_Int32,enumerator,MoveNext) == true)
	{
		printf("%d\n", getVcallT(Collections_IEnumerator,System_Int32,enumerator,Current));
	}
	//b = array_getEnumerator(System_Int32, a);
	//collection = new(2,Collections_List(System_Int32), array_getEnumerable(System_Int32,ints));
	//vcallT(Collections_ICollection,System_Int32,collection,Add, 2);
	//NUnit_Assert_iAreEqual(3, getVcallT(Collections_ICollection,System_Int32,collection,Count));
}


private_ static_ void Clear_TwoElementList_CountEqualsZero()
{
}

private_ static_ void Contains_TwoElementList_EqualsTrue()
{
}

private_ static_ void CopyTo_TwoElementList_CountEqualsTrue()
{
}

private_ static_ void Remove_TwoElementList_CountEqualsOne()
{
}

private_ static_ void getCount_TwoElementList_EqualsTwo()
{
}

private_ static_ void getReadOnly_TwoElementList_EqualsFalse()
{
}

///<summary>
/// RunTests
///</summary>
public static_ void space(Collections_ICollectionFixture,RunTests)()
{
	Test(Add_TwoElementList_CountEqualsThree);
	Test(Clear_TwoElementList_CountEqualsZero);
	Test(Contains_TwoElementList_EqualsTrue);
	Test(CopyTo_TwoElementList_CountEqualsTrue);
	Test(Remove_TwoElementList_CountEqualsOne);
	Test(getCount_TwoElementList_EqualsTwo);
	Test(getReadOnly_TwoElementList_EqualsFalse);
}